const User = require("../models/User")
const {querySql,queryOne} = require('../db')

function login(username, password) {
    return queryOne(`select *
                     from users
                     where username = '${username}'
                       and password = '${password}' `)
}

function findUser(username) {
    return queryOne(`select *
                     from users
                     where username = '${username}'`)
}

module.exports = {
    login,
    findUser
}